﻿

namespace Amplify.Twitter
{
	using System;
	using System.Collections.Generic;
	using System.Linq;
	using System.ServiceModel;
	using System.ServiceModel.Web;
	using System.Text;
	

	/// <summary>
	/// The operation contract for twitters user methods. 
	/// </summary>
	[ServiceContract]
	public interface IUserClient
	{

		/// <summary>
		/// Gets an array of friends with their information for the specified user. 
		/// </summary>
		/// <param name="id">The screen name or id of the user.</param>
		/// <param name="page">The page number (for paging). </param>
		/// <param name="since">Specify a search date for all the friends that have joined since.  </param>
		/// <param name="lite">Specify if you wish to have full or limited user information.  </param>
		/// <returns>returns an array of <see cref="Amplify.Twitter.User"/>.</returns>
		/// <exception cref="System.ServiceModel.Security.MessageSecurityException" />
		/// <exception cref="Amplify.Twitter.TwitterException"> Throws when a twitter error occurs. </exception>
		[OperationContract,
			WebInvoke(
				BodyStyle = WebMessageBodyStyle.Bare,
				ResponseFormat = WebMessageFormat.Json,
				UriTemplate = "/statuses/friends/{id}.json?page={page}&since={since}&lite={lite}")]
		User[] GetFriends(string id, int page, string since, bool lite);

		/// <summary>
		/// Gets an array of people following the specified user.
		/// </summary>
		/// <param name="id">The screen name or id of the user.</param>
		/// <param name="page">The page number (for paging). </param>
		/// <param name="lite">Specify if you wish to have full or limited user information.  </param>
		/// <returns>returns an array of <see cref="Amplify.Twitter.User"/>.</returns>
		/// <exception cref="System.ServiceModel.Security.MessageSecurityException" />
		/// <exception cref="Amplify.Twitter.TwitterException"> Throws when a twitter error occurs. </exception>
		[OperationContract,
			WebInvoke(
				BodyStyle = WebMessageBodyStyle.Bare,
				ResponseFormat = WebMessageFormat.Json,
				UriTemplate = "/statuses/followers/{id}.json?page={page}&lite={lite}")]
		User[] GetFollowers(string id, int page, bool lite);


		/// <summary>
		/// Gets an array of featured users
		/// </summary>
		/// <returns>returns a <see cref="Amplify.Twitter.User"/>.</returns>
		/// <exception cref="System.ServiceModel.Security.MessageSecurityException" />
		/// <exception cref="Amplify.Twitter.TwitterException"> Throws when a twitter error occurs. </exception>
		[OperationContract,
			WebInvoke(
				BodyStyle = WebMessageBodyStyle.Bare,
				ResponseFormat = WebMessageFormat.Json,
				UriTemplate = "/statuses/featured.json")]
		User[] GetFeatured();


		/// <summary>
		/// Shows the extended information of the specified user.
		/// </summary>
		/// <param name="id">The screen name or id of the user.</param>
		/// <returns>returns a <see cref="Amplify.Twitter.User"/>.</returns>
		/// <exception cref="System.ServiceModel.Security.MessageSecurityException" />
		/// <exception cref="Amplify.Twitter.TwitterException"> Throws when a twitter error occurs. </exception>
		[OperationContract,
			WebInvoke(
				BodyStyle = WebMessageBodyStyle.Bare,
				ResponseFormat = WebMessageFormat.Json,
				UriTemplate = "/users/show/{id}.json")]
		User Show(string id);


		/// <summary>
		/// Shows the extended information if the specified user by email.
		/// </summary>
		/// <param name="email">The email of the user.</param>
		/// <returns>returns a <see cref="Amplify.Twitter.User"/>.</returns>
		/// <exception cref="System.ServiceModel.Security.MessageSecurityException" />
		/// <exception cref="Amplify.Twitter.TwitterException"> Throws when a twitter error occurs. </exception>
		[OperationContract,
			WebInvoke(
				BodyStyle = WebMessageBodyStyle.Bare,
				ResponseFormat = WebMessageFormat.Json,
				UriTemplate = "/users/show.json?email={email}")]
		User ShowByEmail(string email);
	}
}
